﻿using MyTodo.Common.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyTodo.ViewModels
{
    class ToDoViewModel :BindableBase
    {
        public ToDoViewModel() 
        {
            CreateTodoList();
        }

        private ObservableCollection<ToDoDto> toDoDtos;
        public ObservableCollection<ToDoDto> ToDoDtos
        {
            get { return toDoDtos; }
            set { toDoDtos = value; RaisePropertyChanged(); }
        }

        void CreateTodoList()
        {
            for (int i = 0; i < 15; i++)
            {
                ToDoDtos.Add(new ToDoDto() {Title = "标题",Content="内容"});
                //
            }
        }
    }
}
